<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;



//es jwt 百度云敏感词 七牛云 rabbitMQ 雪花算法 阿里云直播sdk 支付宝支付 扩展包已安装
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
	return $request->user();
});
//轮播图
Route::post('scrollImg', [\App\Http\Controllers\ScrollImgController::class, 'scrollImgShow']);
//生成直播推流播流地址
Route::get('liveBroadcastUrl', [\App\Http\Controllers\LiveStream\LiveStreamController::class, 'liveBroadcastUrl']);
//进入直播间失败入口
Route::get('liveError',[\App\Http\Controllers\LiveStream\LiveStreamController::class,'liveError'])->name('liveError');
//直播间页面
Route::get('live2',[\App\Http\Controllers\LiveStream\LiveStreamController::class,'live2']);
Route::get('liveVideo',[\App\Http\Controllers\LiveStream\LiveStreamController::class,'liveVideo']);
Route::post('fileUpload',[\App\Http\Controllers\LiveStream\LiveStreamController::class,'fileUpload'])->name('fileUpload');
Route::get('hillSeeding',[\App\Http\Controllers\LiveStream\LiveStreamController::class,'hillSeeding']);
//开团
Route::post('openRegiment', [\App\Http\Controllers\GroupController::class, 'openRegiment']);
Route::get('liveError', [\App\Http\Controllers\LiveStream\LiveStreamController::class, 'liveError'])->name('liveError');
Route::get('file', [\App\Http\Controllers\LiveStream\LiveStreamController::class, 'file']);
Route::get('live', [\App\Http\Controllers\LiveStream\LiveStreamController::class, 'livePage']);
//获取用户信息
Route::get('userData', [\App\Http\Controllers\LiveStream\LiveStreamController::class, 'userData']);
//授权登录  一分钟五次
Route::post('login', [\App\Http\Controllers\UserInforController::class, 'login'])->middleware('throttle:5,1');
//手机号授权
Route::post('getPhoneNumber', [\App\Http\Controllers\UserInforController::class, 'getPhoneNumber']);
Route::post('telFind', [\App\Http\Controllers\UserInforController::class, 'telFind']);
//签到模块
Route::group(['prefix' => 'sign','middleware'=>'user'], function () {
    //用户签到
    Route::post('sign_in', [\App\Http\Controllers\SignIn\SignController::class, 'signIn']);
    //签到信息
    Route::get('sign_info', [\App\Http\Controllers\SignIn\SignController::class, 'signInfo']);
    //用户补签
    Route::post('retroactive', [\App\Http\Controllers\SignIn\SignController::class, 'retroactive']);
});
Route::post('telFind', [\App\Http\Controllers\UserInforController::class, 'telFind']);
Route::post('getPhoneNumber', [\App\Http\Controllers\UserInforController::class, 'getPhoneNumber']);

//秒杀
Route::group(['prefix' => 'seckill', 'middleware' => \App\Http\Middleware\UserInfoMiddleware::class], function () {
    //预热商品
    Route::post('preheatGoods', [\App\Http\Controllers\SeckillController::class, 'preheatGoods']);
    //秒杀商品展示
    Route::post('seckillGoodsShow', [\App\Http\Controllers\SeckillController::class, 'seckillGoodsShow']);
    //前台秒杀
    Route::post('seckillGoods', [\App\Http\Controllers\SeckillController::class, 'seckillGoods'])->middleware('throttle:20,1');
    //时间
    Route::post('time', [\App\Http\Controllers\SeckillController::class, 'time']);
    //根据时间检索
    Route::post('selectTime', [\App\Http\Controllers\SeckillController::class, 'selectTime']);
});
//用户申请团长
Route::post('auditRegimental',[\App\Http\Controllers\RegimentalController::class,'auditRegimental']);
//用户申请团长
    Route::post('auditRegimental',[\App\Http\Controllers\RegimentalController::class,'auditRegimental']);
//前台渲染拼团页面
    Route::get('group_good_show',[\App\Http\Controllers\GroupController::class,'groupGoodShow']);
//拼团详情页
    Route::get('group_detail',[\App\Http\Controllers\GroupController::class,'groupDetail']);
//用户拼团
    Route::post('groupBooking',[\App\Http\Controllers\GroupController::class,'groupBooking']);
//通过关键字搜索商品
    Route::get('searchGoods',[\App\Http\Controllers\SearchController::class,'searchGoods']);
//获取热门词
    Route::get('keyword',[\App\Http\Controllers\SearchController::class,'keyword']);
//用户拼团
    Route::post('groupBooking',[\App\Http\Controllers\GroupController::class,'groupBooking']);
    Route::get('searchGoods',[\App\Http\Controllers\SearchController::class,'searchGoods']);
//用户开团获取参数
    Route::get('sunGroup',[\App\Http\Controllers\GroupController::class,'sunGroup']);
//展示等待拼团的信息到页面
    Route::get('openGroupShow',[\App\Http\Controllers\GroupController::class,'openGroupShow']);
//获取自提点
    Route::get('oneselfCarrySite',[\App\Http\Controllers\GroupController::class,'oneselfCarrySite']);